package com.cuhk.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cuhk.common.utils.PageUtils;
import com.cuhk.gulimall.member.entity.MemberEntity;
import com.cuhk.gulimall.member.exception.NoMemberFoundException;
import com.cuhk.gulimall.member.exception.NoUniqueMemberNameException;
import com.cuhk.gulimall.member.exception.NoUniqueMemberPhoneException;
import com.cuhk.gulimall.member.exception.PasswordNotFoundException;
import com.cuhk.gulimall.member.vo.MemberLoginVo;
import com.cuhk.gulimall.member.vo.MemberRegisterVo;

import java.util.Map;

/**
 * 会员
 *
 * @author chenyujing
 * @email torchsam@aliyun.com
 * @date 2024-06-10 14:39:46
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveMember(MemberRegisterVo memberRegisterVo);

    void checkMemberNameUnique(String memberName) throws NoUniqueMemberNameException;

    void checkMemberPhoneUnique(String memberPhone) throws NoUniqueMemberPhoneException;

    void loginMember(MemberLoginVo memberLoginVo) throws NoMemberFoundException, PasswordNotFoundException;

}

